<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu" data-widget="tree">
            <li class="header">主菜单</li>
            <% if(menus.length > 0){ %>
            <% menus.forEach(function(item, index){ %>

            <li class="<% if(item['menu_child'].length > 0){ %>treeview<%}%> <% if(item['menu_id'] ==(typeof(menu_active)=="undefined"?"": menu_active['parent_id']) ){ %> active menu-open<% } %>">
                <a href="<%= item['menu_url'] %>">
                    <i class="glyphicon <%= item['menu_icon'] %>"></i> <span><%= item['menu_name'] %></span>
                    <% if(item['menu_child'].length > 0){ %>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    <% } %>
                </a>
                <% if(item['menu_child'].length > 0){ %>
                <ul class="treeview-menu">
                    <% item['menu_child'].forEach(function(child, index){ %>
                    <li <% if(child['menu_id'] == (typeof(menu_active)=="undefined"?"": menu_active['menu_id'])){ %>class="active"
                            <% } %>
                    ><a href="<%= child['menu_url'] %>"><i
                                    class="far fa-circle"></i> <%= index + 1 %>：<%= child['menu_name'] %></a></li>
                    <% }) %>
                </ul>
                <% } %>
            </li>
            <% })} else{ %>
            <li class="treeview">
                <a href="#">
                    <i class="glyphicon"></i> <span>暂无菜单</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
            </li>
            <% } %>
        </ul>
    </section>
    <!-- /.sidebar -->
</aside>

